import store from "../../../../store";
console.log('kzStateList',store.state.layout.app.kzStateList);
const subStatusList = store.state.layout.app.kzStateList;
const staList = [
  {
    label: '全部',
    value: '全部'
  }
]
subStatusList.forEach(item => {
  let map = {}
  map.label = item.sub_kz_status_name
  map.value = item.sub_kz_status_name
  staList.push(map)
})
const filteredValueList = []
const list = [
    {
      type: "selection",
      width: 30,
      align: "center",
    },
    {
      title: "ID",
      type: "index",
      width: 30,
      align: "center",
    },
    {
      title: "姓名",
      key: "kz_name",
      align: "center",
      width: 80
    },
    {
      title: "类型",
      key: "type_name",
      align: "center",
      width: 80,
    },
    {
      title: "渠道",
      key: "source_channel",
      align: "center",
      width: 150
    },
    {
      title: "状态",
      key: "sub_kz_status_name",
      align: "center",
      width: 80,
      filters: staList,
      filteredValue: filteredValueList,
      filterMethod: (value, row) => {
        console.log(value,row.sub_kz_status_name);
        if (value == '全部') {
          return true;
        } else {
          return row.sub_kz_status_name.indexOf(value) > -1;
        }
      }
    },
    {
      key: "create_time",
      title: "创建时间",
      sortable: true,
      width: 130,
      align: "center",
      sortMethod: (a,b,type) => {
        console.log(a,b,type);
      }
    },
    {
      title: "手机",
      key: "kz_phone",
      align: "center",
      width: 100
    },
    {
      title: "微信",
      key: "wx_id",
      align: "center",
      width: 130
    },
    {
      title: "意向度",
      key: "intention_level",
      align: "center",
      width: 80
    },
    {
      title: "预算",
      key: "budget",
      align: "center",
      width: 80
    },
    {
      title: "邀约组",
      key: "promoter",
      align: "center",
      width: 80,
    },
    {
      title: "邀约员工",
      key: "promoter",
      align: "center",
      width: 80,
    },
    {
      title: "操作",
      slot: "action",
      fixed: "right",
      align: "center",
      width: 200,
    },
]
export default list
